
function initTestSceneBuffers() {
    vData = [// coords,    color
            ];
    // Creates the walls
    vData = crateSquareXY(vData, -50, 0, -50, [0.788,0.788,0.788,1.0], 100, 20);
    vData = crateSquareXY(vData, -50, 0,  50, [0.788,0.788,0.788,1.0], 100, 20);
    vData = crateSquareZY(vData, -50, 0, -50, [0.788,0.788,0.788,1.0], 100, 20);
    vData = crateSquareZY(vData,  50, 0, -50, [0.788,0.788,0.788,1.0], 100, 20);

    // Creates the posts
    vData = crateSquareXY(vData,  20, 0, -20, [1.0,0.0,0.0,1.0], 5, 20);
    vData = crateSquareZY(vData,  20, 0, -25, [0.0,0.0,1.0,1.0], 5, 20);
    vData = crateSquareXY(vData, -25, 0, -20, [1.0,0.0,0.0,1.0], 5, 20);
    vData = crateSquareZY(vData, -20, 0, -25, [0.0,0.0,1.0,1.0], 5, 20);
    vData = crateSquareXY(vData, -25, 0,  20, [1.0,0.0,0.0,1.0], 5, 20);
    vData = crateSquareZY(vData, -20, 0,  20, [0.0,0.0,1.0,1.0], 5, 20);
    vData = crateSquareXY(vData,  20, 0,  20, [1.0,0.0,0.0,1.0], 5, 20);
    vData = crateSquareZY(vData,  20, 0,  20, [0.0,0.0,1.0,1.0], 5, 20);

    // Creates the floor
    colorCode = false;
    for(var i=-50; i<50; i=i+5) {
        colorCode = !colorCode;
        for(var j=-50; j<50; j=j+5) {
            colorCode = !colorCode;
            if(colorCode == false) {
                color = [1.0,1.0,1.0,1.0];
            } else {
                color = [0.0,0.0,0.0,1.0];
            }
            vData = crateSquareXZ(vData, i, 0, j, color, 5,5);
        }
    }
    vData = crateSquareXZ(vData, -50, 20, -50, [0.215,0.705,1.0,1.0], 100,100); // Creates the celing
    vData = crateSquareXY(vData, -5, 0, -49.9, [0.301,0.164,0.074,1.0], 10,15); // Creates the door
    vData = crateSquareZY(vData, -49.95, 4.5, -10.5, [0.301,0.164,0.074,1.0], 11,11);  // Creates the left window outline
    vData = crateSquareZY(vData, -49.9, 5, -10, [0.215,0.705,1.0,1.0], 10,10);  // Creates the left window
    vData = crateSquareZY(vData, 49.95, 4.5, -30.5, [0.301,0.164,0.074,1.0], 31,11);  // Creates the right window outline
    vData = crateSquareZY(vData, 49.9, 5, -30, [0.215,0.705,1.0,1.0], 30,10);   // Creates the right window
    return vData;
}


function crateSquareXZ(vData, offsetX, offsetY, offsetZ, color, sizeX, sizeZ) {
    var square = [// coords,    color
                offsetX-0.0,   offsetY, offsetZ-0.0,   color[0],color[1],color[2],color[3],
                offsetX-0.0,   offsetY, offsetZ+sizeZ, color[0],color[1],color[2],color[3],
                offsetX+sizeX, offsetY, offsetZ+sizeZ, color[0],color[1],color[2],color[3],
                offsetX+sizeX, offsetY, offsetZ+sizeZ, color[0],color[1],color[2],color[3],
                offsetX+sizeX, offsetY, offsetZ-0.0,   color[0],color[1],color[2],color[3],
                offsetX-0.0,   offsetY, offsetZ-0.0,   color[0],color[1],color[2],color[3]
                ];
    return vData.concat(square);
}

function crateSquareXY(vData, offsetX, offsetY, offsetZ, color, sizeX, sizeY) {
    var square = [// coords,    color
                offsetX-0.0,   offsetY-0.0,   offsetZ, color[0],color[1],color[2],color[3],
                offsetX-0.0,   offsetY+sizeY, offsetZ, color[0],color[1],color[2],color[3],
                offsetX+sizeX, offsetY+sizeY, offsetZ, color[0],color[1],color[2],color[3],
                offsetX+sizeX, offsetY+sizeY, offsetZ, color[0],color[1],color[2],color[3],
                offsetX+sizeX, offsetY-0.0,   offsetZ, color[0],color[1],color[2],color[3],
                offsetX-0.0,   offsetY-0.0,   offsetZ, color[0],color[1],color[2],color[3]
                ];
    return vData.concat(square);
}

function crateSquareZY(vData, offsetX, offsetY, offsetZ, color, sizeZ, sizeY) {
    var square = [// coords,    color
                offsetX, offsetY-0.0,   offsetZ-0.0,   color[0],color[1],color[2],color[3],
                offsetX, offsetY+sizeY, offsetZ-0.0,   color[0],color[1],color[2],color[3],
                offsetX, offsetY+sizeY, offsetZ+sizeZ, color[0],color[1],color[2],color[3],
                offsetX, offsetY+sizeY, offsetZ+sizeZ, color[0],color[1],color[2],color[3],
                offsetX, offsetY-0.0,   offsetZ+sizeZ, color[0],color[1],color[2],color[3],
                offsetX, offsetY-0.0,   offsetZ-0.0,   color[0],color[1],color[2],color[3]
                ];
    return vData.concat(square);
}